package com.engine4cloud.tdf.supervision.feign;

import com.engine4cloud.tdf.common.core.constant.SecurityConstants;
import com.engine4cloud.tdf.common.core.constant.ServiceNameConstants;
import com.engine4cloud.tdf.common.core.util.R;
import com.engine4cloud.tdf.common.data.web.response.PageInfo;
import com.engine4cloud.tdf.supervision.dto.query.SpHelpDepartQueryDTO;
import com.engine4cloud.tdf.supervision.dto.query.SpHelpQueryDTO;
import com.engine4cloud.tdf.supervision.dto.result.SpHelpResultDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient(contextId = "RemoteHelpService", value = ServiceNameConstants.SUPERVISION_SERVER)
public interface RemoteHelpService {

    @PostMapping("/inner/help/page")
    R<PageInfo<SpHelpResultDTO>> getPageList(@RequestBody SpHelpQueryDTO dto, @RequestHeader(SecurityConstants.FROM) String from);

    @PostMapping("/inner/help/dept/page")
    R<PageInfo<SpHelpResultDTO>> getDeptPageList(@RequestBody SpHelpDepartQueryDTO dto, @RequestHeader(SecurityConstants.FROM) String from);

    @GetMapping("/inner/help/{id}")
    R<SpHelpResultDTO> getById(@PathVariable Long id, @RequestHeader(SecurityConstants.FROM) String from);
}
